import Layout from '@/layout'
import EmptyLayout from '@/layout/empty'

export default {
    path: '/memberManage',
    component: Layout,
    redirect: '/memberManage/list',
    name: 'memberManage',
    meta: {
        title: '会员管理',
        icon: 'member-nav-icon'
    },
    children: [
        {
            path: 'list',
            name: 'memberManageList',
            component: EmptyLayout,
            redirect: '/list',
            meta: {
                title: '会员管理',
                auth: ['member.browse']
            },
            children: [
                {
                    path: '',
                    name: 'memberList',
                    component: () => import(/* webpackChunkName: 'member_manage' */ '@/views/member_manage/member/index'),
                    meta: {
                        title: '会员管理',
                        sidebar: false,
                        breadcrumb: false
                    }
                },
                {
                    path: 'add',
                    name: 'memberAdd',
                    component: () => import(/* webpackChunkName: 'member_manage' */ '@/views/member_manage/member/detail'),
                    meta: {
                        title: '新增会员',
                        sidebar: false,
                        activeMenu: '/memberManage/list'
                    }
                },
                {
                    path: 'edit/:id',
                    name: 'memberEdit',
                    component: () => import(/* webpackChunkName: 'member_manage' */ '@/views/member_manage/member/detail'),
                    meta: {
                        title: '编辑会员',
                        sidebar: false,
                        activeMenu: '/memberManage/list'
                    }
                }
            ]
        },
        {
            path: 'level',
            name: 'memberManageLevel',
            component: () => import(/* webpackChunkName: 'member_manage' */ '@/views/member_manage/level/index'),
            meta: {
                title: '会员等级',
                auth: ['member_level.browse']
            }
        }
    ]
}
